<?php
/**
 * boatClass.php
 * This file holds the class that vi instanciate new boats from
 *
 * @author Peter, Thomas, Tryggve
 * @version 0.1
 * @copyright Oh, yes!
 * @package default
 * @subpackage classes
 */

class BoatClass {
	
	public $memberId = null ;
	public $boatId = null ;
	public $length = null ;
	public $type = null ;

	/**
     * setBoat
     * Instead of a contsructor since our orm doesn't like it
     * 
     * @param array $a_boatInfo Information from the form, probably from a post
     * 
     * @return NULL
     */
	function create($a_boatInfo) {
		$this->memberId = $a_boatInfo['memberId'] ;
		$this->length = $a_boatInfo['length'] ;
		$this->type = $a_boatInfo['type'] ;

        // Only set boatId if it exists
        $this->boatId = isset($a_boatInfo['boatId'])? $a_boatInfo['boatId'] : null ;

    }
    
    function getId() {
        return $this->boatId ;
    }

}
